package com.cf.auth.model;

import com.cf.code.core.CField;
import com.cf.code.core.CModel;
import com.cf.code.core.CPage;
import com.cf.crud.entity.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * boot-awm-Auth
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/7/11 上午 11:00
 */
@Entity
@Table(name = "auth")
@CModel(pages = {
        @CPage(title = "授权项目列表", path = "auth", templateName = "list.ftl", outPutName = "list.ftl"),
        @CPage(title = "授权项目", path = "auth", templateName = "add.ftl", outPutName = "add.ftl"),
        @CPage(title = "授权项目", path = "auth", templateName = "update.ftl", outPutName = "update.ftl")
})
public class Auth extends BaseEntity {

    @CField(lab = "项目名字")
    private String name;

    @CField(lab = "添加时间")
    @Column(name = "addTime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date addTime = new Date();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }
}
